import request from "@/utils/request";
import { AxiosPromise } from "axios";

export const getCaptcha: (data: any) => AxiosPromise<any> = data =>
  request({
    url: "/uacbackend/userlogin/v1/get-captcha ",
    method: "get"
  });

export const getUserInfo: (data: any) => AxiosPromise<any> = data =>
  request({
    url: "/users/info",
    method: "post",
    data
  });

export const login = (data: any) =>
  request({
    url: "/users/login",
    method: "post",
    data
  });

export const logout = () =>
  request({
    url: "/users/logout",
    method: "post"
  });
